// JavaScript Document
$(document).ready(function(){
						   
						   Date.firstDayOfWeek = 0;
						   Date.format = 'mm/dd/yyyy';
						   
	  var myDate=new Date();
							myDate.setDate(myDate.getDate()+7);
						   
						   $('#start-date').datePicker().val(new Date().asString()).trigger('change');
						   $('#end-date').datePicker().val(myDate.asString()).trigger('change');					   
						   

	$('#start-date').bind(
		'dpClosed',
		function(e, selectedDates)
		{
			var d = selectedDates[0];
			if (d) {
				d = new Date(d);
				$('#end-date').dpSetStartDate(d.addDays(1).asString());
			}
		}
	);
	$('#end-date').bind(
		'dpClosed',
		function(e, selectedDates)
		{
			var d = selectedDates[0];
			if (d) {
				d = new Date(d);
				$('#start-date').dpSetEndDate(d.addDays(-1).asString());
			}
		}
	);
  
	
	
	
	
	
	
	
	
	
});

$("#test_request").validate({
							 
		
   submitHandler: function(form) {
	   
	  	
	   
		$.ajax({
				type:"POST",
				url:"requestTestService.php",
				data:$(".test_request").serialize(),
				cache: false,
				
				success: function(msg){
     				$("#contactArea").html(msg);
					
   						}

		});
		 $("#contactArea").html("<div style='padding-top:120px; text-align:center;'><img src='18-0.gif' align='absmiddle'><br>Testing Request....<br> This May take upto 1 Min.</div>");

   }
})
	
	